﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Control_DangKiThanhVien : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnDangKi_Click(object sender, EventArgs e)
    {
        if (txtTenDNDK.Text.Trim().Length != 0)
        {
            string query = "insert into thanhvien values('" + txtTenDNDK.Text + "','" + txtMKDK.Text + "','" + txtHoTen.Text + "','" + txtEmail.Text + "','" + txtDiaChi.Text + "','" + txtDienThoai.Text + "','true')";
            XuLy xl = new XuLy();
            xl.XuLyDuLieu(query);
            Response.Write("<script> alert('Đăng Kí Thành Công ') ;</script>");
            Response.Redirect("~/TrangChu/Index.aspx");
        }

        else 
        {
            Response.Write("<script> alert('Tên Đăng Nhập Không Được Để Trống!') ;</script>");
        }
    }
}